const defaultState={

}

function product(state=defaultState,action){
    switch(action.type){
        case 'ADDTOCART':
            return !state.carts? {...state,carts:[action.data]}:{...state,carts:[...state.carts,action.data]};;
        default:
            return state;
        
    }
}

module.exports=product;